import React from 'react'
import {useSelector,} from "react-redux"
import { SideBar } from 'antd-mobile'
function EitFood() {
  const data = useSelector(state=>state.reducer.data)
  const set_children = (key)=>{
    console.log(key);
    
  }
  return (
    <div style={{display:"flex"}}> 
      <SideBar onChange={set_children}>
        {
          data&&data.map((item,index)=>{
            return <SideBar.Item key={index} title={item.title}/>
          })
        }
        </SideBar>
        <div >
          123
      </div>
    </div>
  )
}

export default EitFood
